﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace TouchRC.Logic
{
    public static class FileInfoExtensions
    {
        public static bool ValidFileFormat(this FileInfo file, string[] validFormats)
        {
            bool validFileFormat = false;
            foreach (string extension in validFormats)
            {
                if (file.Name.EndsWith(extension))
                {
                    validFileFormat = true;
                    break;
                }
            }

            return validFileFormat;
        }

    }
}
